<?php
	class sanphambs
	{
		public $MaSanPham = 0;
		public $MaLoai = 0;
		public $MaChatLieu = 0;
		public $MaNhaSX = 0;
		public $MaNhomHang = 0;
		public $TenSanPham = "";
		public $MoTa = "";
		public $DonGia = 0;
		public $SoLuong = 0;
		public $dsma = "";
		public $key = "";
		public $loai = 0;
		public $NgayDang = "0000-00-00";
		public $LuotXem = 0;
		public $MaKichThuoc = 0;
		public $MaKieuDang = 0;
		public $MauSac = "";
		public function Add()
		{
			$data = new sanphamdb();
			return $data->Add($this->MaLoai, $this->MaChatLieu, $this->MaNhaSX, $this->MaNhomHang, $this->TenSanPham, $this->MoTa, $this->DonGia, $this->SoLuong,$this->MaKichThuoc, $this->MaKieuDang, $this->MauSac, $this->NgayDang, $this->LuotXem);
		}
		
		public function Delete()
		{
			$data = new sanphamdb();
			return $data->Delete($this->MaSanPham);
		}
		public function Update()
		{
			$data = new sanphamdb();
			return $data->Update($this->MaSanPham, $this->MaLoai, $this->MaChatLieu, $this->MaNhaSX, $this->MaNhomHang, $this->TenSanPham, $this->MoTa, $this->DonGia, $this->SoLuong,$this->MaKichThuoc, $this->MaKieuDang, $this->MauSac);
		}
		public function Update_SoLuong()
		{
			$data = new sanphamdb();
			return $data->Update_SoLuong($this->MaSanPham, $this->SoLuong);
		}
		public function GetList()
		{
			$data = new sanphamdb();
			return $data->GetList($this->MaSanPham, $this->MaLoai, $this->MaChatLieu, $this->MaNhaSX, $this->MaNhomHang, $this->TenSanPham, $this->MoTa, $this->DonGia, $this->SoLuong);
		}
		public function GetList_New()
		{
			$data = new sanphamdb();
			return $data->GetList_New();
		}
		public function GetPageList_New($start = 0, $limit = 10)
		{
			$data = new sanphamdb();
			return $data->GetPageList_New($start, $limit);
		}
		public function GetList_Loaisp()
		{
			$data = new sanphamdb();
			return $data->GetList_Loaisp();
		}
		public function GetList_MaSanPham()
		{
			$data = new sanphamdb();
			return $data->GetList_MaSanPham($this->dsma);
		}
		public function Find()
		{
			$data = new sanphamdb();
			return $data->Find($this->key,$this->loai);
		}
		public function PageList_Find($start = 0, $limit = 10)
		{
			$data = new sanphamdb();
			return $data->PageList_Find($this->key,$this->loai,$start, $limit);
		}
		public function AscNumView()
		{
			$data = new sanphamdb();
			return $data->AscNumView($this->MaSanPham);
		}
	}
?>